This specification describes technologies relating to client and server communications.
Designing web pages to accommodate client-server communication in multiple web browsers today is very difficult. Each web browser implements some subset of various standards and has different capabilities and shortcomings, necessitating a substantial amount of browser-specific coding. There are also many different transport protocols used to implement client and server communication, such as XMLHttpRequest (XHR), JavaScript Object Notation (JSON), JSON with Padding (JSONP), embedded iFrames, browserchannel, Flash, and WebSockets, to name just a few. Each of these protocols has their own downsides, some of which can, with difficulty, be worked around. Additionally, new transport protocols are constantly being developed, and the adoption rate of the new protocols is not uniform. For example, some developers may incorporate a new transport protocol into their browser while the protocol is still in a developmental stage, while other developers may not incorporate the protocol into their browsers until well after the protocol is initially released, if ever.
Thus, every time a developer wants to write a client-side resource, such as a JavaScript feature, that requires client-server communication, he or she must manage the coding effort to accommodate for multiple different capabilities for multiple different client agents, and must also monitor the ever changing mix of capabilities.
Various libraries have been written to address first problem, i.e., that of browser-specific code being required to implement individual transport methods, but none of these libraries have the capability to handle multiple different transport protocols for multiple different client agents. Instead, these libraries offer implementations of individual browser-agnostic transport channels. Thus, while developers do not need to write browser-specific code using these libraries, they are still bound to a single channel type across multiple browsers.